// @ts-ignore - Ignoring type issues with cache module import
import { saveUserToken, getUserToken, clearUserToken } from "./cache/index";

const TOKEN_KEY = 'current-user-token';

// 设置token
export function setToken<T = string>(token: T) {
    saveUserToken(token as string);
}

// 获取token
export function getToken<T = string>() {
    return getUserToken() as T;
}

// 清除token
export function removeToken() {
    clearUserToken();
}
